package com.langfeiyes.pattern.strategy;

/**
 * 上下文环境，负责与策略类交互
 */
public class Context {

    //指定的执行策略对象
    private IStrategy strategy;

    public Context(IStrategy strategy) {
        this.strategy = strategy;
    }
    //执行策略
    void strategyExecute(){
        strategy.doLogic();
    }
}
